﻿using Data.Tables;
using PayrollExpress.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PayrollExpress.Models
{

    public class HolidayListModel: BaseModel
    {
        public HolidayListModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      BaseHelper.Page.Holidays.ToDescription()
                  )
        { }

        public int SelectedYear { get; set; }

        public IEnumerable<SelectListItem> Years { get; set; }

        public List<HolidayQuery> ListItems { get; set; }
    }

    public class HolidaysAddModel: BaseModel
    {
        public HolidaysAddModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Holidays.ToString(), BaseHelper.Page.Holidays.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.HolidaysAdd.ToDescription()
                  )
        { }

        public int Year { get; set; }

        public IEnumerable<SelectListItem> CalendarMonths { get; set; }

        public IEnumerable<SelectListItem> CalendarDays { get; set; }

        public IEnumerable<SelectListItem> HolidayTypes { get; set; }

        public List<HolidayQuery> NewRecurringHolidays { get; set; }

        public List<HolidayQuery> NewHolidays { get; set; }

        public Holiday Type { get; set; }
    }

    public class HolidayEditModel: BaseModel
    {
        public HolidayEditModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Holidays.ToString(), BaseHelper.Page.Holidays.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.HolidayEdit.ToDescription()
                  )
        { }

        public IEnumerable<SelectListItem> CalendarMonths { get; set; }

        public IEnumerable<SelectListItem> CalendarDays { get; set; }

        public IEnumerable<SelectListItem> HolidayTypes { get; set; }

        public Holiday Type { get; set; }

        public DateTime Date { get; set; }
    }

    public class EmployeeListModel: BaseModel
    {
        public EmployeeListModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      BaseHelper.Page.Employees.ToDescription()
                  )
        { }

        public int SelectedWorkLocationID { get; set; }

        public IEnumerable<SelectListItem> WorkLocations { get; set; }

        public List<EmployeeQuery> ListItems { get; set; }
    }

    public class EmployeeAddEditModel: BaseModel
    {
        public EmployeeAddEditModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Employees.ToString(), BaseHelper.Page.Employees.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.EmployeeAddEdit.ToDescription()
                  )
        { }

        public int SelectedWorkLocationID { get; set; }

        public IEnumerable<SelectListItem> WorkLocations { get; set; }

        public Employee Type { get; set; }

        public string IsActiveYesNo { get; set; }
    }

    public class EmployeeContractListModel : BaseModel
    {
        public EmployeeContractListModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Employees.ToString(), BaseHelper.Page.Employees.ToDescription())
                      },
                      BaseHelper.Page.EmployeeContracts.ToDescription()
                  )
        { }

        public string EmployeeCode { get; set; }

        public string EmployeeName { get; set; }

        public List<EmployeeContractQuery> ListItems { get; set; }
    }

    public class EmployeeContractAddEditModel : BaseModel
    {
        public EmployeeContractAddEditModel()
            : base(
                      BaseHelper.ControllerName.Masterfile.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Employees.ToString(), BaseHelper.Page.Employees.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.EmployeeContractAddEdit.ToDescription()
                  )
        { }

        public string EmployeeCode { get; set; }

        public string EmployeeName { get; set; }

        public IEnumerable<SelectListItem> EmploymentTypes { get; set; }

        public IEnumerable<SelectListItem> RateTypes { get; set; }

        public EmployeeContract Type { get; set; }

    }
    
}